﻿<%@ Register TagPrefix="cc1" Namespace="GDC.Utility.Web" Assembly="ASBCC.Utility" %>

<%@ Page Language="c#" AutoEventWireup="false" CodeBehind="ActionPoint.aspx.cs" Inherits="BEGDC.CC.Web.UserControls.EV.ActionPoint" %>

<%@ Register TagPrefix="uc1" TagName="APAttachment" Src="APAttachment.ascx" %>
<%@ Register TagPrefix="uc1" TagName="APCommentCtrl" Src="APCommentCtrl.ascx" %>
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>Action Point</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <link href="../../css/global.css" rel="stylesheet" type="text/css" />
    <link href="../../CSS/calendar.css" type="text/css" rel="stylesheet" />
    <link href="../../css/flow.css" rel="stylesheet" type="text/css" />
    <link href="../../css/footer.css" rel="stylesheet" type="text/css" />
    <link href="../../css/style_fu.css" rel="stylesheet" type="text/css" />
    <link href="../../css/content/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />

    <script src="../../js/jquery-1.4.4.min.js" type="text/javascript"></script>

    <script src="../../js/jquery.query-2.1.7.js" type="text/javascript"></script>

    <script src="../../js/jquery-ui.min.js" type="text/javascript"></script>

    <script src="../../js/common.js" type="text/javascript"></script>

    <script src="../../js/ccworkflow.js" type="text/javascript"></script>

    <script src="../../js/alert.vbs" type="text/vbscript"></script>

    <script src="../../js/workflow.js.aspx" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">

        $(function() {
            $(".datepicker2").datepicker({
                showOn: "button",
                buttonImage: "../../images/calendar.gif",
                buttonImageOnly: true,
                buttonText: 'Open Calendar (打开日历)'
            }).attr("readonly", "true");

            $("#txtDescription").bind("change", function() {
                var text = $(this).val();
                if (text.length > 500) {
                    alert("The length of Description is longer than maxlength. \n 描述长度超过最大限度！");
                    $(this).val(text.substring(0, 499));
                }
            });
        });

        function OnSubmit() {
            if (document.getElementById("txtDueTime").value == "") {
                alert("Please input Due Date");
                event.returnValue = false;
                return;
            }
            else {
                OnSubmitAlert("Are you sure to close the Action Point?");
            }
        }
        function OnSave() {
            var dueDateObj = document.getElementById("txtDueTime")
            //.value;
            if (dueDateObj == null)
                dueDateObj = document.getElementById("lblDueTimeValue");
            if (dueDateObj == null) {
                window.returnValue = "save";
                return;
            }
            var dueDate = dueDateObj.value;
            if (dueDate != null && dueDate == "") {
                alert("Please specify Due Date !");
                event.returnValue = false;
                return;
            }
            //OnSaveAlert("You are about to save the information.\n\rAre you sure to proceed?");
            window.returnValue = "save";
        }
        function OnQuery() {
            OnSaveAlert("Are you sure to query the Action Point?");
        }
        function OnClose() {
            var parent = window.opener;
            parent.location.reload();
        }
        function AddAPComment() {
            var obj = window.showModalDialog('APCommentCtrl.aspx?APID=<%=APID%>', '', 'dialogHeight:400px;dialogWidth:500px;status:no;scroll:Yes;resizable:no;');
            if (obj == "reload") {
                document.Form1.submit();
            }
            event.returnValue = false;
        }
        function OpenAPUserForm(type) {
            var obj = window.showModalDialog('SearchAPUser.aspx?Type=' + type, '', 'dialogHeight:400px;dialogWidth:450px;status:no;scroll:no;resizable:no;');
            if (obj != null && obj == "reload") {
                document.Form1.submit();
            }
            event.returnValue = false;
        }			
    </script>

</head>
<body>
    <form id="Form1" method="post" runat="server">
    <table cellspacing="0" cellpadding="0" class="table_center">
        <tr>
            <td>
                <img src="../../images/logo2.gif" alt="" />
            </td>
        </tr>
        <tr class="line_border">
            <td>
            </td>
        </tr>
        <tr>
            <td>
                <!--Begin Body-->
                <div class="txt_align_rgt padding5 action_layer">
                    <asp:ResourceButton ID="ibtnSave" runat="server" Text="Save" ToolTip="SaveTips" CssClass="btn" />
                    <asp:ResourceButton ID="ibt_Modify" runat="server" Text="Modify" ToolTip="ModifyTips"
                        CssClass="btn" Visible="False" />
                    <asp:ResourceButton ID="ibtnSubmit" runat="server" Text="CloseAP" ToolTip="CloseAPTips"
                        CssClass="btn app-close" />
                </div>
            </td>
        </tr>
        <tr>
            <td class="title_list1 ac linkimg">
                <span class="icon_form2"></span>&nbsp;Action Point<br />
                会议纪要
                <div class="workflow-debug">
                    Debug:
                    <%=this.GetType().BaseType.FullName %></div>
            </td>
        </tr>
        <tr>
            <td>
                <div id="blockDiv">
                    <table width="100%">
                        <tr>
                            <td colspan="2" class="title_list">
                                &nbsp;1. Action Point Content (纪要内容)
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td class="td_title bold_title txt_align_rgt">
                                Type:
                                <br />
                                类型
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:DropDownList ID="ddlType" runat="server">
                                </asp:DropDownList>
                                <asp:Label ID="lblTypeValue" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="td_title bold_title txt_align_rgt">
                                No.:
                                <br />
                                单号
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:TextBox ID="txtNo" runat="server" ReadOnly="True"></asp:TextBox>
                                <asp:Label ID="lblAPNoValue" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="td_title bold_title txt_align_rgt">
                                Status:
                                <br />
                                状态
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:TextBox ID="txtStatus" runat="server" ReadOnly="True"></asp:TextBox>
                                <asp:Label ID="lblStatusValue" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td class="td_title bold_title txt_align_rgt">
                                Priority:
                                <br />
                                优先级
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:DropDownList ID="ddlPRT" runat="server">
                                </asp:DropDownList>
                                <asp:Label ID="lblPRTValue" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td class="td_title bold_title txt_align_rgt">
                                Classfication:
                                <br />
                                分类
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:DropDownList ID="ddlClassfication" runat="server">
                                </asp:DropDownList>
                                <asp:Label ID="lblClassValue" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td class="td_title bold_title txt_align_rgt">
                                CAT:
                                <br />
                                总部
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:DropDownList ID="ddlCAT" runat="server">
                                </asp:DropDownList>
                                <asp:Label ID="lblCATValue" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="td_title bold_title txt_align_rgt">
                                <span>*</span>Due Time:
                                <br />
                                到期日期
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:TextBox ID="txtDueTime" runat="server" CssClass="datepicker2"></asp:TextBox>
                                <span id="spanDueDate" runat="server">
                                    <%--<img id="imgDueDate" onclick="showCalendar('Form1','txtDueTime','imgOptionalDate',false,31,12,1900,31,12,2100);return false;"
                                        src="../../images/calendar.gif" alt="" name="imgOptionalDate" />--%>
                                </span>
                                <asp:Label ID="lblDueTimeValue" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr id="tr_ClosedDate" runat="server">
                            <td class="td_title bold_title txt_align_rgt">
                                Lastest reply Time:
                                <br />
                                最后回复时间
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:TextBox ID="txtClosedDate" runat="server" CssClass="datepicker2"></asp:TextBox>
                                <span id="spanClosedDate" runat="server">
                                    <%--<img id="imgClosedDate" onclick="showCalendar('Form1','txtClosedDate','imgClosedDate',false,31,12,1900,31,12,2100);return false;"
                                        src="../../images/calendar.gif" alt="" name="imgOptionalDate" />--%></span>
                                <asp:Label ID="lbClosedDate" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="td_title bold_title txt_align_rgt">
                                Description:
                                <br />
                                描述
                            </td>
                            <td class="td_txt bold_title" id="Description" runat="server">
                                &nbsp;
                                <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" CssClass="COMMENT"></asp:TextBox>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td class="td_title bold_title txt_align_rgt">
                                Operator:
                                <br />
                                操作人员
                            </td>
                            <td class="td_txt bold_title">
                                &nbsp;
                                <asp:TextBox ID="txtOperator" runat="server"></asp:TextBox>
                                <asp:Label ID="lblOperatorValue" runat="server" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" class="title_list">
                                &nbsp;2. Action Point Contributers (纪要贡献者)
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td colspan="2">
                                <table width="100%">
                                    <tr>
                                        <td class="td_txt bold_title" id="Td1" runat="server">
                                            Owners (提供者)
                                            <br />
                                            <%-- <img onmousemove="this.style.cursor='hand'" id="imgAPOwner" onclick="javascript:OpenAPUserForm('Owner')"
                                                alt="new" src="../../Images/b-Add.gif" runat="server" />
                                            <button class="btn">
                                                Add</button>--%>
                                            <asp:ResourceButton ID="imgAPOwner" runat="server" Text="Add" ToolTip="AddTips" CssClass="btn" />
                                            <br />
                                            <asp:DataGrid ID="dtGridAPOwner" runat="server" AutoGenerateColumns="False" CssClass="tablestyle"
                                                Width="98%">
                                                <AlternatingItemStyle></AlternatingItemStyle>
                                                <ItemStyle CssClass="tbody"></ItemStyle>
                                                <HeaderStyle CssClass="thead"></HeaderStyle>
                                                <Columns>
                                                    <asp:BoundColumn Visible="False" DataField="RowId" HeaderText="RowId"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="NameEN" HeaderText="Name<br />姓名"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="Description" HeaderText="Department<br />部门"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="APType" HeaderText="Type<br />类型"></asp:BoundColumn>
                                                    <asp:ButtonColumn Text="<img src='../../images/delete.gif' border=0 alt='删除'>" HeaderText="Delete<br />删除"
                                                        CommandName="Delete"></asp:ButtonColumn>
                                                </Columns>
                                            </asp:DataGrid>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <table width="100%">
                                    <tr>
                                        <td class="td_txt bold_title">
                                            <%--  Contributers (贡献者)
                                            <br />--%>
                                            <%-- <img onmousemove="this.style.cursor='hand'" id="imgAPContributer" onclick="javascript:OpenAPUserForm('Contributer')"
                                                alt="new" src="../../Images/b-Add.gif" runat="server" />
                                            <button class="btn">
                                                Add</button>--%>
                                            <asp:ResourceButton ID="imgAPContributer" runat="server" Text="Add" ToolTip="AddTips"
                                                CssClass="btn" />
                                            <br />
                                            <asp:DataGrid ID="dtGridAPContributers" runat="server" AutoGenerateColumns="False"
                                                CssClass="tablestyle" Width="98%">
                                                <AlternatingItemStyle></AlternatingItemStyle>
                                                <ItemStyle CssClass="tbody"></ItemStyle>
                                                <HeaderStyle CssClass="thead"></HeaderStyle>
                                                <Columns>
                                                    <asp:BoundColumn Visible="False" DataField="RowId" HeaderText="RowId"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="NameEN" HeaderText="Name<br />姓名"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="Description" HeaderText="Department<br />部门"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="APType" HeaderText="Type<br />类型"></asp:BoundColumn>
                                                    <asp:ButtonColumn Text="&lt;img src='../../images/delete.gif' border=0 &gt; " HeaderText="Delete<br />删除"
                                                        CommandName="Delete"></asp:ButtonColumn>
                                                </Columns>
                                            </asp:DataGrid>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr id="attachment" runat="server" style="display: none">
                            <td colspan="2">
                                <table width="100%">
                                    <tr>
                                        <td class="title_list">
                                            &nbsp;3.Action Point Attachment (纪要附件)
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td_txt bold_title">
                                            <uc1:APAttachment ID="apAttachment1" runat="server"></uc1:APAttachment>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr id="APTrace" runat="server">
                            <td colspan="2">
                                <table width="100%">
                                    <tr>
                                        <td class="title_list">
                                            &nbsp;4.Add Comments (添加事件)
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="td_txt bold_title">
                                            <%-- <img onmousemove="this.style.cursor='hand'" id="imgAddAPComment" onclick="javascript:AddAPComment();"
                                                alt="new" src="../../Images/b-Add.gif" runat="server" />
                                            <button class="btn">
                                                Add</button>--%>
                                            <asp:ResourceButton ID="imgAddAPComment" runat="server" Text="Add" ToolTip="AddTips"
                                                CssClass="btn" />
                                            <br />
                                            <asp:DataGrid ID="dtGridAPComment" runat="server" AutoGenerateColumns="False" CssClass="tablestyle"
                                                Width="98%">
                                                <AlternatingItemStyle></AlternatingItemStyle>
                                                <ItemStyle CssClass="tbody"></ItemStyle>
                                                <HeaderStyle CssClass="thead"></HeaderStyle>
                                                <Columns>
                                                    <asp:BoundColumn Visible="False" DataField="APCommentID" HeaderText="No"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="Events" HeaderText="Event <br/>事件"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="Date" HeaderText="Date <br/>日期" DataFormatString="{0:MM/dd/yyyy}">
                                                    </asp:BoundColumn>
                                                    <asp:BoundColumn DataField="AnsweredBy" HeaderText="Answered By <br/>回复者"></asp:BoundColumn>
                                                    <asp:BoundColumn DataField="Including" HeaderText="Including <br/> 意见一致者" Visible="False">
                                                    </asp:BoundColumn>
                                                </Columns>
                                            </asp:DataGrid>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td class="title_list1 ac linkimg" height="40">
            </td>
        </tr>
    </table>
    </form>
    <%--页面刷新时显示--%>
    <div id="dialog-message" title="Loading..." style="display: none">
        <p>
            <br />
            <span class="workflow-loading"></span><span>Operation in process, please wait...<br />
                <br />
                处理中, 请稍候。。。</span>
        </p>
    </div>
    <%--追加Print, Close, Log按钮--%>
    <input type="button" id="workflow-log" style="display: none" />
    <input type="button" id="workflow-close" style="display: none" />
</body>
</html>
